package cn.learn.service.system.wxuser.impl;

import cn.learn.dao.system.wxuser.WxUserDao;
import cn.learn.domain.system.wxuser.WxUser;
import cn.learn.domain.system.wxuser.WxUserExample;
import cn.learn.service.system.wxuser.WxUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxUserServiceImpl implements WxUserService {
    @Autowired
    private WxUserDao wxUserDao;

    @Override
    public WxUser findUserByOpenId(String openId) {
        WxUser wxUser = wxUserDao.selectByPrimaryKey(openId);
        return wxUser;
    }

    @Override
    public void upDateByUser(WxUser wxUser) {
        wxUserDao.updateByPrimaryKeySelective(wxUser);

    }

    @Override
    public void save(WxUser wxUser) {
        wxUserDao.insert(wxUser);
    }

    @Override
    public void deleteUserOd(String openid) {
        wxUserDao.deleteByPrimaryKey(openid);
    }


}
